#define _GNU_SOURCE
#include"app_pool.h"
#include"unistd.h"
#include"stdio.h"
//定义任务
void *task_func(void *arg)
{   sleep(1);
    printf("zhangshan hello thread number: %d \n",gettid());
    return NULL;
}
int main()
{
    //初始化线程池
    app_pool_init();
    //提交任务
    app_pool_submit_task(task_func,NULL);
    app_pool_submit_task(task_func,NULL);
    app_pool_submit_task(task_func,NULL);
    app_pool_submit_task(task_func,NULL);
    app_pool_submit_task(task_func,NULL);
    app_pool_submit_task(task_func,NULL);

    //sleep
    sleep(10);
    //销毁线程池
    app_pool_destroy();
}